package com.jeeplus.modules.monitor.service;

import com.jeeplus.modules.tools.utils.MultiDBUtils;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.sql.SQLException;

/**
 * @author Administrator
 * @title: jobService
 * @projectName JeePlus
 * @description: TODO
 * @date 2019/9/912:26
 */
@Service
@Transactional(readOnly = true)
public class jobService {
    @Transactional(readOnly = false)
    public void test() {
        JdbcTemplate jdbcTemplate = MultiDBUtils.get("VSS").getJdbcTemplate();
        jdbcTemplate.execute("call vss.generate_uss_soa()");
        try {
            jdbcTemplate.getDataSource().getConnection().prepareCall("");
        } catch (SQLException e) {
            e.printStackTrace();
        }
    }
}
